Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show traceback by default #2862

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Show traceback by default #2862

merged 7 commits into from
Oct 25, 2024

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Oct 24, 2024

Tracking issue

NA

Why are the changes needed?

The error message is not helpful in some cases when verbosity is 0.

Screenshot 2024-10-24 at 3 42 12 PM

What changes were proposed in this pull request?

print the traceback by default

How was this patch tested?

from dataclasses import dataclass

from flytekit import task, workflow, ImageSpec
from flytekit.configuration import Config
from flytekit.remote import FlyteRemote

remote = FlyteRemote(Config.auto(), default_project="flytesnacks", default_domain="development", interactive_mode_enabled=True)
new_flytekit = "git+https://github.com/flyteorg/flytekit.git@8017ae825b7c4cc3913971fab5308b172370d335"
img = ImageSpec(registry="pingsutw", packages=[new_flytekit], apt_packages=["git"])


@dataclass
class MyDatclass:
    id: int
    name: str
    age: int


@task(container_image=img)
def hello(dc: MyDatclass) -> str:
    return f"Hello {dc.name}"


@workflow
def wf(dc: MyDatclass = MyDatclass(id=1, name="foo", age=18)) -> str:
    return hello(name=dc.name)

Setup process

pyflyte run --remote flyte-example/improve_error/dataclass_mismatch.py wf

Screenshots

Screenshot 2024-10-24 at 4 01 40 PM

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

NA

Docs link

NA

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@pingsutw pingsutw merged commit c5cc389 into master Oct 25, 2024
104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants